Integrand size = 23, antiderivative size = 86 \[ \int \frac {\sec ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx=-\frac {(2 a-b) \text {arctanh}(\sin (e+f x))}{2 b^2 f}+\frac {a^{3/2} \text {arctanh}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{b^2 \sqrt {a+b} f}+\frac {\sec (e+f x) \tan (e+f x)}{2 b f} \]
-1/2*(2*a-b)*arctanh(sin(f*x+e))/b^2/f+a^(3/2)*arctanh(sin(f*x+e)*a^(1/2)/ (a+b)^(1/2))/b^2/f/(a+b)^(1/2)+1/2*sec(f*x+e)*tan(f*x+e)/b/f
Result contains complex when optimal does not.
Time = 4.77 (sec) , antiderivative size = 1195, normalized size of antiderivative = 13.90 \[ \int \frac {\sec ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {(a+2 b+a \cos (2 (e+f x))) \sec ^2(e+f x) \left (4 a \log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )-2 b \log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )-4 a \log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )+2 b \log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )+\frac {a^{3/2} \cos (e) \log \left (a+2 (a+b) \cos (2 e)-a \cos (2 (e+f x))-2 i a \sin (2 e)-2 i b \sin (2 e)+2 \sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (f x)+2 \sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (2 e+f x)\right )}{\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}}-\frac {a^{3/2} \cos (e) \log \left (-a-2 (a+b) \cos (2 e)+a \cos (2 (e+f x))+2 i a \sin (2 e)+2 i b \sin (2 e)+2 \sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (f x)+2 \sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (2 e+f x)\right )}{\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}}+\frac {2 i a^{3/2} \arctan \left (\frac {2 \sin (e) \left (i a+i b+i (a+b) \cos (2 e)+\sqrt {a} \sqrt {a+b} \cos (f x) \sqrt {(\cos (e)-i \sin (e))^2}-\sqrt {a} \sqrt {a+b} \cos (2 e+f x) \sqrt {(\cos (e)-i \sin (e))^2}+a \sin (2 e)+b \sin (2 e)-i \sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (f x)-i \sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (2 e+f x)\right )}{i (a+3 b) \cos (e)+i (a+b) \cos (3 e)+i a \cos (e+2 f x)+i a \cos (3 e+2 f x)+3 a \sin (e)+b \sin (e)+a \sin (3 e)+b \sin (3 e)+a \sin (e+2 f x)-a \sin (3 e+2 f x)}\right ) \sqrt {(\cos (e)-i \sin (e))^2} (\cos (e)+i \sin (e))}{\sqrt {a+b}}-\frac {i a^{3/2} \log \left (a+2 (a+b) \cos (2 e)-a \cos (2 (e+f x))-2 i a \sin (2 e)-2 i b \sin (2 e)+2 \sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (f x)+2 \sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (2 e+f x)\right ) \sin (e)}{\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}}+\frac {i a^{3/2} \log \left (-a-2 (a+b) \cos (2 e)+a \cos (2 (e+f x))+2 i a \sin (2 e)+2 i b \sin (2 e)+2 \sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (f x)+2 \sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (2 e+f x)\right ) \sin (e)}{\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}}+\frac {2 a^{3/2} \arctan \left (\frac {(a+b) \sin (e)}{(a+b) \cos (e)-\sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} (\cos (2 e)+i \sin (2 e)) \sin (e+f x)}\right ) \sqrt {(\cos (e)-i \sin (e))^2} (-i \cos (e)+\sin (e))}{\sqrt {a+b}}+\frac {b}{\left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^2}-\frac {b}{\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2}\right )}{8 b^2 f \left (a+b \sec ^2(e+f x)\right )} \]
((a + 2*b + a*Cos[2*(e + f*x)])*Sec[e + f*x]^2*(4*a*Log[Cos[(e + f*x)/2] - Sin[(e + f*x)/2]] - 2*b*Log[Cos[(e + f*x)/2] - Sin[(e + f*x)/2]] - 4*a*Lo g[Cos[(e + f*x)/2] + Sin[(e + f*x)/2]] + 2*b*Log[Cos[(e + f*x)/2] + Sin[(e + f*x)/2]] + (a^(3/2)*Cos[e]*Log[a + 2*(a + b)*Cos[2*e] - a*Cos[2*(e + f* x)] - (2*I)*a*Sin[2*e] - (2*I)*b*Sin[2*e] + 2*Sqrt[a]*Sqrt[a + b]*Sqrt[(Co s[e] - I*Sin[e])^2]*Sin[f*x] + 2*Sqrt[a]*Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[ e])^2]*Sin[2*e + f*x]])/(Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2]) - (a^(3/ 2)*Cos[e]*Log[-a - 2*(a + b)*Cos[2*e] + a*Cos[2*(e + f*x)] + (2*I)*a*Sin[2 *e] + (2*I)*b*Sin[2*e] + 2*Sqrt[a]*Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2] *Sin[f*x] + 2*Sqrt[a]*Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2]*Sin[2*e + f* x]])/(Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2]) + ((2*I)*a^(3/2)*ArcTan[(2* Sin[e]*(I*a + I*b + I*(a + b)*Cos[2*e] + Sqrt[a]*Sqrt[a + b]*Cos[f*x]*Sqrt [(Cos[e] - I*Sin[e])^2] - Sqrt[a]*Sqrt[a + b]*Cos[2*e + f*x]*Sqrt[(Cos[e] - I*Sin[e])^2] + a*Sin[2*e] + b*Sin[2*e] - I*Sqrt[a]*Sqrt[a + b]*Sqrt[(Cos [e] - I*Sin[e])^2]*Sin[f*x] - I*Sqrt[a]*Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e ])^2]*Sin[2*e + f*x]))/(I*(a + 3*b)*Cos[e] + I*(a + b)*Cos[3*e] + I*a*Cos[ e + 2*f*x] + I*a*Cos[3*e + 2*f*x] + 3*a*Sin[e] + b*Sin[e] + a*Sin[3*e] + b *Sin[3*e] + a*Sin[e + 2*f*x] - a*Sin[3*e + 2*f*x])]*Sqrt[(Cos[e] - I*Sin[e ])^2]*(Cos[e] + I*Sin[e]))/Sqrt[a + b] - (I*a^(3/2)*Log[a + 2*(a + b)*Cos[ 2*e] - a*Cos[2*(e + f*x)] - (2*I)*a*Sin[2*e] - (2*I)*b*Sin[2*e] + 2*Sqr...
Time = 0.29 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.10, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3042, 4635, 316, 25, 397, 219, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sec (e+f x)^5}{a+b \sec (e+f x)^2}dx\) |
\(\Big \downarrow \) 4635 |
\(\displaystyle \frac {\int \frac {1}{\left (1-\sin ^2(e+f x)\right )^2 \left (-a \sin ^2(e+f x)+a+b\right )}d\sin (e+f x)}{f}\) |
\(\Big \downarrow \) 316 |
\(\displaystyle \frac {\frac {\int -\frac {a \sin ^2(e+f x)+a-b}{\left (1-\sin ^2(e+f x)\right ) \left (-a \sin ^2(e+f x)+a+b\right )}d\sin (e+f x)}{2 b}+\frac {\sin (e+f x)}{2 b \left (1-\sin ^2(e+f x)\right )}}{f}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {\sin (e+f x)}{2 b \left (1-\sin ^2(e+f x)\right )}-\frac {\int \frac {a \sin ^2(e+f x)+a-b}{\left (1-\sin ^2(e+f x)\right ) \left (-a \sin ^2(e+f x)+a+b\right )}d\sin (e+f x)}{2 b}}{f}\) |
\(\Big \downarrow \) 397 |
\(\displaystyle \frac {\frac {\sin (e+f x)}{2 b \left (1-\sin ^2(e+f x)\right )}-\frac {\frac {(2 a-b) \int \frac {1}{1-\sin ^2(e+f x)}d\sin (e+f x)}{b}-\frac {2 a^2 \int \frac {1}{-a \sin ^2(e+f x)+a+b}d\sin (e+f x)}{b}}{2 b}}{f}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\frac {\sin (e+f x)}{2 b \left (1-\sin ^2(e+f x)\right )}-\frac {\frac {(2 a-b) \text {arctanh}(\sin (e+f x))}{b}-\frac {2 a^2 \int \frac {1}{-a \sin ^2(e+f x)+a+b}d\sin (e+f x)}{b}}{2 b}}{f}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {\frac {\sin (e+f x)}{2 b \left (1-\sin ^2(e+f x)\right )}-\frac {\frac {(2 a-b) \text {arctanh}(\sin (e+f x))}{b}-\frac {2 a^{3/2} \text {arctanh}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{b \sqrt {a+b}}}{2 b}}{f}\) |
(-1/2*(((2*a - b)*ArcTanh[Sin[e + f*x]])/b - (2*a^(3/2)*ArcTanh[(Sqrt[a]*S in[e + f*x])/Sqrt[a + b]])/(b*Sqrt[a + b]))/b + Sin[e + f*x]/(2*b*(1 - Sin [e + f*x]^2)))/f
3.2.80.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim p[(-b)*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(2*a*(p + 1)*(b*c - a*d)) ), x] + Simp[1/(2*a*(p + 1)*(b*c - a*d)) Int[(a + b*x^2)^(p + 1)*(c + d*x ^2)^q*Simp[b*c + 2*(p + 1)*(b*c - a*d) + d*b*(2*(p + q + 2) + 1)*x^2, x], x ], x] /; FreeQ[{a, b, c, d, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && ! ( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomialQ[a, b, c, d, 2, p, q, x]
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ Symbol] :> Simp[(b*e - a*f)/(b*c - a*d) Int[1/(a + b*x^2), x], x] - Simp[ (d*e - c*f)/(b*c - a*d) Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e , f}, x]
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_ ))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f Subst[Int[ExpandToSum[b + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 - ff^2*x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && In tegerQ[(m - 1)/2] && IntegerQ[n/2] && IntegerQ[p]
Time = 0.79 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.23
method | result | size |
derivativedivides | \(\frac {\frac {a^{2} \operatorname {arctanh}\left (\frac {a \sin \left (f x +e \right )}{\sqrt {a \left (a +b \right )}}\right )}{b^{2} \sqrt {a \left (a +b \right )}}-\frac {1}{4 b \left (\sin \left (f x +e \right )+1\right )}+\frac {\left (-2 a +b \right ) \ln \left (\sin \left (f x +e \right )+1\right )}{4 b^{2}}-\frac {1}{4 b \left (\sin \left (f x +e \right )-1\right )}+\frac {\left (2 a -b \right ) \ln \left (\sin \left (f x +e \right )-1\right )}{4 b^{2}}}{f}\) | \(106\) |
default | \(\frac {\frac {a^{2} \operatorname {arctanh}\left (\frac {a \sin \left (f x +e \right )}{\sqrt {a \left (a +b \right )}}\right )}{b^{2} \sqrt {a \left (a +b \right )}}-\frac {1}{4 b \left (\sin \left (f x +e \right )+1\right )}+\frac {\left (-2 a +b \right ) \ln \left (\sin \left (f x +e \right )+1\right )}{4 b^{2}}-\frac {1}{4 b \left (\sin \left (f x +e \right )-1\right )}+\frac {\left (2 a -b \right ) \ln \left (\sin \left (f x +e \right )-1\right )}{4 b^{2}}}{f}\) | \(106\) |
risch | \(-\frac {i \left ({\mathrm e}^{3 i \left (f x +e \right )}-{\mathrm e}^{i \left (f x +e \right )}\right )}{f b \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2}}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) a}{b^{2} f}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{2 b f}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) a}{b^{2} f}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{2 b f}+\frac {\sqrt {a \left (a +b \right )}\, a \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {a \left (a +b \right )}\, {\mathrm e}^{i \left (f x +e \right )}}{a}-1\right )}{2 \left (a +b \right ) f \,b^{2}}-\frac {\sqrt {a \left (a +b \right )}\, a \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {a \left (a +b \right )}\, {\mathrm e}^{i \left (f x +e \right )}}{a}-1\right )}{2 \left (a +b \right ) f \,b^{2}}\) | \(240\) |
1/f*(a^2/b^2/(a*(a+b))^(1/2)*arctanh(a*sin(f*x+e)/(a*(a+b))^(1/2))-1/4/b/( sin(f*x+e)+1)+1/4/b^2*(-2*a+b)*ln(sin(f*x+e)+1)-1/4/b/(sin(f*x+e)-1)+1/4*( 2*a-b)/b^2*ln(sin(f*x+e)-1))
Time = 0.29 (sec) , antiderivative size = 272, normalized size of antiderivative = 3.16 \[ \int \frac {\sec ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\left [\frac {2 \, a \sqrt {\frac {a}{a + b}} \cos \left (f x + e\right )^{2} \log \left (-\frac {a \cos \left (f x + e\right )^{2} - 2 \, {\left (a + b\right )} \sqrt {\frac {a}{a + b}} \sin \left (f x + e\right ) - 2 \, a - b}{a \cos \left (f x + e\right )^{2} + b}\right ) - {\left (2 \, a - b\right )} \cos \left (f x + e\right )^{2} \log \left (\sin \left (f x + e\right ) + 1\right ) + {\left (2 \, a - b\right )} \cos \left (f x + e\right )^{2} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, b \sin \left (f x + e\right )}{4 \, b^{2} f \cos \left (f x + e\right )^{2}}, -\frac {4 \, a \sqrt {-\frac {a}{a + b}} \arctan \left (\sqrt {-\frac {a}{a + b}} \sin \left (f x + e\right )\right ) \cos \left (f x + e\right )^{2} + {\left (2 \, a - b\right )} \cos \left (f x + e\right )^{2} \log \left (\sin \left (f x + e\right ) + 1\right ) - {\left (2 \, a - b\right )} \cos \left (f x + e\right )^{2} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 2 \, b \sin \left (f x + e\right )}{4 \, b^{2} f \cos \left (f x + e\right )^{2}}\right ] \]
[1/4*(2*a*sqrt(a/(a + b))*cos(f*x + e)^2*log(-(a*cos(f*x + e)^2 - 2*(a + b )*sqrt(a/(a + b))*sin(f*x + e) - 2*a - b)/(a*cos(f*x + e)^2 + b)) - (2*a - b)*cos(f*x + e)^2*log(sin(f*x + e) + 1) + (2*a - b)*cos(f*x + e)^2*log(-s in(f*x + e) + 1) + 2*b*sin(f*x + e))/(b^2*f*cos(f*x + e)^2), -1/4*(4*a*sqr t(-a/(a + b))*arctan(sqrt(-a/(a + b))*sin(f*x + e))*cos(f*x + e)^2 + (2*a - b)*cos(f*x + e)^2*log(sin(f*x + e) + 1) - (2*a - b)*cos(f*x + e)^2*log(- sin(f*x + e) + 1) - 2*b*sin(f*x + e))/(b^2*f*cos(f*x + e)^2)]
\[ \int \frac {\sec ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\int \frac {\sec ^{5}{\left (e + f x \right )}}{a + b \sec ^{2}{\left (e + f x \right )}}\, dx \]
Time = 0.27 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.44 \[ \int \frac {\sec ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx=-\frac {\frac {2 \, a^{2} \log \left (\frac {a \sin \left (f x + e\right ) - \sqrt {{\left (a + b\right )} a}}{a \sin \left (f x + e\right ) + \sqrt {{\left (a + b\right )} a}}\right )}{\sqrt {{\left (a + b\right )} a} b^{2}} + \frac {{\left (2 \, a - b\right )} \log \left (\sin \left (f x + e\right ) + 1\right )}{b^{2}} - \frac {{\left (2 \, a - b\right )} \log \left (\sin \left (f x + e\right ) - 1\right )}{b^{2}} + \frac {2 \, \sin \left (f x + e\right )}{b \sin \left (f x + e\right )^{2} - b}}{4 \, f} \]
-1/4*(2*a^2*log((a*sin(f*x + e) - sqrt((a + b)*a))/(a*sin(f*x + e) + sqrt( (a + b)*a)))/(sqrt((a + b)*a)*b^2) + (2*a - b)*log(sin(f*x + e) + 1)/b^2 - (2*a - b)*log(sin(f*x + e) - 1)/b^2 + 2*sin(f*x + e)/(b*sin(f*x + e)^2 - b))/f
Time = 0.29 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.31 \[ \int \frac {\sec ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx=-\frac {\frac {4 \, a^{2} \arctan \left (\frac {a \sin \left (f x + e\right )}{\sqrt {-a^{2} - a b}}\right )}{\sqrt {-a^{2} - a b} b^{2}} + \frac {{\left (2 \, a - b\right )} \log \left ({\left | \sin \left (f x + e\right ) + 1 \right |}\right )}{b^{2}} - \frac {{\left (2 \, a - b\right )} \log \left ({\left | \sin \left (f x + e\right ) - 1 \right |}\right )}{b^{2}} + \frac {2 \, \sin \left (f x + e\right )}{{\left (\sin \left (f x + e\right )^{2} - 1\right )} b}}{4 \, f} \]
-1/4*(4*a^2*arctan(a*sin(f*x + e)/sqrt(-a^2 - a*b))/(sqrt(-a^2 - a*b)*b^2) + (2*a - b)*log(abs(sin(f*x + e) + 1))/b^2 - (2*a - b)*log(abs(sin(f*x + e) - 1))/b^2 + 2*sin(f*x + e)/((sin(f*x + e)^2 - 1)*b))/f
Time = 0.55 (sec) , antiderivative size = 591, normalized size of antiderivative = 6.87 \[ \int \frac {\sec ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {b\,\left (a\,\sin \left (e+f\,x\right )-a\,\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )+a\,{\sin \left (e+f\,x\right )}^2\,\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )\right )+b^2\,\left (\sin \left (e+f\,x\right )+\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )-{\sin \left (e+f\,x\right )}^2\,\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )\right )-2\,a^2\,\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )+2\,a^2\,{\sin \left (e+f\,x\right )}^2\,\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )+\mathrm {atan}\left (\frac {-a\,\sin \left (e+f\,x\right )\,{\left (a^4+b\,a^3\right )}^{3/2}\,8{}\mathrm {i}-b\,\sin \left (e+f\,x\right )\,{\left (a^4+b\,a^3\right )}^{3/2}\,4{}\mathrm {i}+a^5\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,8{}\mathrm {i}-a^2\,b^3\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,2{}\mathrm {i}+a^3\,b^2\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,1{}\mathrm {i}+a\,b^4\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,1{}\mathrm {i}+a^4\,b\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,12{}\mathrm {i}}{3\,a^5\,b^2+5\,a^4\,b^3+a^3\,b^4-a^2\,b^5}\right )\,\sqrt {a^4+b\,a^3}\,2{}\mathrm {i}-\mathrm {atan}\left (\frac {-a\,\sin \left (e+f\,x\right )\,{\left (a^4+b\,a^3\right )}^{3/2}\,8{}\mathrm {i}-b\,\sin \left (e+f\,x\right )\,{\left (a^4+b\,a^3\right )}^{3/2}\,4{}\mathrm {i}+a^5\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,8{}\mathrm {i}-a^2\,b^3\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,2{}\mathrm {i}+a^3\,b^2\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,1{}\mathrm {i}+a\,b^4\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,1{}\mathrm {i}+a^4\,b\,\sin \left (e+f\,x\right )\,\sqrt {a^4+b\,a^3}\,12{}\mathrm {i}}{3\,a^5\,b^2+5\,a^4\,b^3+a^3\,b^4-a^2\,b^5}\right )\,{\sin \left (e+f\,x\right )}^2\,\sqrt {a^4+b\,a^3}\,2{}\mathrm {i}}{f\,\left (-2\,b^3\,{\sin \left (e+f\,x\right )}^2+2\,b^3-2\,a\,b^2\,{\sin \left (e+f\,x\right )}^2+2\,a\,b^2\right )} \]
(b*(a*sin(e + f*x) - a*atanh(sin(e + f*x)) + a*sin(e + f*x)^2*atanh(sin(e + f*x))) + atan((a^5*sin(e + f*x)*(a^3*b + a^4)^(1/2)*8i - b*sin(e + f*x)* (a^3*b + a^4)^(3/2)*4i - a*sin(e + f*x)*(a^3*b + a^4)^(3/2)*8i - a^2*b^3*s in(e + f*x)*(a^3*b + a^4)^(1/2)*2i + a^3*b^2*sin(e + f*x)*(a^3*b + a^4)^(1 /2)*1i + a*b^4*sin(e + f*x)*(a^3*b + a^4)^(1/2)*1i + a^4*b*sin(e + f*x)*(a ^3*b + a^4)^(1/2)*12i)/(a^3*b^4 - a^2*b^5 + 5*a^4*b^3 + 3*a^5*b^2))*(a^3*b + a^4)^(1/2)*2i + b^2*(sin(e + f*x) + atanh(sin(e + f*x)) - sin(e + f*x)^ 2*atanh(sin(e + f*x))) - 2*a^2*atanh(sin(e + f*x)) - atan((a^5*sin(e + f*x )*(a^3*b + a^4)^(1/2)*8i - b*sin(e + f*x)*(a^3*b + a^4)^(3/2)*4i - a*sin(e + f*x)*(a^3*b + a^4)^(3/2)*8i - a^2*b^3*sin(e + f*x)*(a^3*b + a^4)^(1/2)* 2i + a^3*b^2*sin(e + f*x)*(a^3*b + a^4)^(1/2)*1i + a*b^4*sin(e + f*x)*(a^3 *b + a^4)^(1/2)*1i + a^4*b*sin(e + f*x)*(a^3*b + a^4)^(1/2)*12i)/(a^3*b^4 - a^2*b^5 + 5*a^4*b^3 + 3*a^5*b^2))*sin(e + f*x)^2*(a^3*b + a^4)^(1/2)*2i + 2*a^2*sin(e + f*x)^2*atanh(sin(e + f*x)))/(f*(2*a*b^2 + 2*b^3 - 2*b^3*si n(e + f*x)^2 - 2*a*b^2*sin(e + f*x)^2))